<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/elements/head2.jsp"  %>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-3.1.1.js"></script>
<script type="text/javascript">
	$("#name").blur(function(){
		if($("#name").val()==""){
			alert("请输入用户名!");
		}
	});
	$("#pwd").blur(function(){
		if($("#pwd").val()==""){
			alert("请输入密码!");
		}
	});
	function submit(){
		if($("#name").val()=="" || $("#pwd").val()==""){
			return false;
		}
	}
	
</script>
</head>
<body>
<div id="loginTitle" class="png"></div>
<div id="loginForm" class="userForm png">
	<c:if test="${!empty userload }">
		<c:redirect url="mymsg.jsp"></c:redirect>
	</c:if>
	<c:if test="${empty userload }">
	
	<form action="Userservlet?opr=log" method="post" onsubmit="return submit()">
	<!-- <table>
		<tr>
			<td>用户名：	</td>
			<td><input type="text" name="username" id="name" checked="">	</td>
		</tr>
			<tr>
			<td>密码：</td>
			<td><input type="password" name="password" id="pwd">	</td>
		</tr>
		<tr>
		<td><input type="submit" value="登陆" id="sub"></td>
		<td><a href="register.jsp"><input type="button" value="注册" ></a></td>
		</tr>
	</table> -->
	<dl>			
			<div id="error">${error}用户登陆</div>
			<dt>用户名：</dt>
			<dd><input type="text" name="username" /></dd>
			<dt>密　码：</dt>
			<dd><input type="password" name="password" /></dd>
		</dl>
		<div class="buttons">
			<input class="btn-login png" type="submit" name="submit" value=" " /><input class="btn-reg png" type="button" name="register" value=" " />
		</div>		
	</form>
	</c:if>
	</div>
</body>
</html>